package com.example.openplaydemo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class PcmPlayer extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //不是关联创建的布局文件，需手动加载布局文件
        setContentView(R.layout.activity_pcmplayer);
        //添加仅播放pcm数据的活动视图
        Button pcm_player = (Button) findViewById(R.id.pcm_player);
        pcm_player.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                playPcm();
            }
        });
    }

    public native void playPcm();
}
